/**
 * Created by DELL on 2017/6/23.
 */
(function() {
    'use strict';
    var checkedObject = {};
    /**
     * 中介联系人 列表初始化设置
     * @type {Object}
     */
    var settings = {
        "sAjaxSource": window.globalHost + common.allCreditListPath,
        "aoColumns": [{
            "mDataProp": function(obj) {
                return "<a href='../submenu.html?key=agentCredit&id=" + obj.agentId + "'>" + (obj.agentName===""?"无信息":obj.agentName)+"&nbsp; / &nbsp;"+obj.mobile+ "</a>"
            },
            "sTitle": "经纪人",
            "sDefaultContent": ""
        }, {
            "mDataProp": function (obj) {
                return obj.addPoint==""?"无信息":obj.addPoint;
            },
            "sTitle": "累计增加积分",
            "sDefaultContent": ""
        },{
            "mDataProp": function(obj) {
                return obj. subPoint==""?"无信息":obj.subPoint;
            },
            "sTitle": "累计消耗积分",
            "sDefaultContent": ""
        },{
            "mDataProp": function(obj) {
                return obj. freezePoint===""?"无信息":obj.freezePoint;
            },
            "sTitle": "当前冻结积分",
            "sDefaultContent": ""
        },{
            "mDataProp": function(obj) {
                return obj. point===""?"无信息":obj.point;
            },
            "sTitle": "积分余额",
            "sDefaultContent": "",
            "sClass": "text-center"
        },{
            "mDataProp":"updateTime",
            "sTitle": "更新时间",
            "sDefaultContent": "",
            "sClass": "text-center"
        }],
        "fnServerParams": function(aoData) {
            return common.getSearchData("form.data-list-search",aoData);
        }
    };
    var options = $.extend(true, {}, _dataTableSettings, settings);
    /**
     * 实例化 中介联系人 列表插件
     * @type {[type]}
     */
    var $currentDataTable=$("#data-list");
    var oTable = $currentDataTable.dataTable(options);
    searchList.getDataList(oTable);
    searchList.resetSearch(oTable);
}).call(this);